package com.ruoyi.system.service.impl;

import java.util.List;

import com.ruoyi.common.utils.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.TbOrderGoodsMapper;
import com.ruoyi.system.domain.TbOrderGoods;
import com.ruoyi.system.service.ITbOrderGoodsService;

/**
 * 订单商品Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-06-16
 */
@Service
public class TbOrderGoodsServiceImpl implements ITbOrderGoodsService 
{
    @Autowired
    private TbOrderGoodsMapper tbOrderGoodsMapper;

    /**
     * 查询订单商品
     * 
     * @param oitId 订单商品主键
     * @return 订单商品
     */
    @Override
    public TbOrderGoods selectTbOrderGoodsByOitId(Long oitId)
    {
        return tbOrderGoodsMapper.selectTbOrderGoodsByOitId(oitId);
    }

    /**
     * 查询订单商品列表
     * 
     * @param tbOrderGoods 订单商品
     * @return 订单商品
     */
    @Override
    public List<TbOrderGoods> selectTbOrderGoodsList(TbOrderGoods tbOrderGoods)
    {
        return tbOrderGoodsMapper.selectTbOrderGoodsList(tbOrderGoods);
    }

    /**
     * 新增订单商品
     * 
     * @param tbOrderGoods 订单商品
     * @return 结果
     */
    @Override
    public int insertTbOrderGoods(TbOrderGoods tbOrderGoods)
    {
        return tbOrderGoodsMapper.insertTbOrderGoods(tbOrderGoods);
    }

    /**
     * 修改订单商品
     * 
     * @param tbOrderGoods 订单商品
     * @return 结果
     */
    @Override
    public int updateTbOrderGoods(TbOrderGoods tbOrderGoods)
    {
        return tbOrderGoodsMapper.updateTbOrderGoods(tbOrderGoods);
    }

    /**
     * 批量删除订单商品
     * 
     * @param oitIds 需要删除的订单商品主键
     * @return 结果
     */
    @Override
    public int deleteTbOrderGoodsByOitIds(Long[] oitIds)
    {
        return tbOrderGoodsMapper.deleteTbOrderGoodsByOitIds(oitIds);
    }

    /**
     * 删除订单商品信息
     * 
     * @param oitId 订单商品主键
     * @return 结果
     */
    @Override
    public int deleteTbOrderGoodsByOitId(Long oitId)
    {
        return tbOrderGoodsMapper.deleteTbOrderGoodsByOitId(oitId);
    }
}
